# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=metame
pkgver=14.8d583a0
pkgrel=9
pkgdesc='A simple metamorphic code engine for arbitrary executables.'
groups=('blackarch' 'blackarch-binary')
arch=('any')
url='https://github.com/a0rtega/metame'
license=('MIT')
depends=('python' 'python-simplejson' 'python-keystone' 'python-r2pipe'
         'radare2')
makedepends=('git' 'python-setuptools' 'python-wheel')
source=("git+https://github.com/a0rtega/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

build() {
  cd $pkgname

  python setup.py build
}

package() {
  cd $pkgname

  python setup.py install --root="$pkgdir" --prefix=/usr --skip-build

  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md
  install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

